home *** CD-ROM | disk | FTP | other *** search
- * Program.: DOS-PATH.PRG
- * Author..: Kelly Mc Tiernan
- * Date....: 01/22/84
- * Notice..: Copyright 1984, Kelly Mc Tiernan, All Rights Reserved.
- * Version.: dBASE II, version 2.4
- * Notes...: Accessing DOS 2.0 directories from within dBASE II.
- *
- * IN: path-C-63 Parameter containing DOS 2.0 pathname.
- * command-C-2 Parameter containing DOS 2.0 directory
- * command [MD,RD,CD].
- * OUT: is:error-L-1 Validation flag.
- *
- STORE T TO is:error
- * ---Parameter checking.
- STORE !(path) TO path
- STORE !(command) TO command
- IF LEN(path) > 63
- * ---DOS 2.0 does not allow paths over 63 chars.
- RETURN
- ENDIF
- SET CALL TO 56832
- * -----------0---1---2---3---4---5---6---7---8---9
- POKE 56832, 83,156,137, 38, 61,222,138, 15
- POKE 56840,181, 00, 67,186, 63,222,137,215,137,222,;
- 252,243,164,198, 05, 00,180, 00,205, 33
- * ---This byte receives a parameter------^
- POKE 56860,114, 07,139, 38, 61,222,157, 91,195, 75,;
- 138, 15,181, 00, 67, 73,198, 07, 69, 67
- POKE 56880,137,223,176, 32,243,170,139, 38, 61,222,;
- 157, 91,195
- * -----------0---1---2---3---4---5---6---7---8---9
- DO CASE
- CASE command="MD"
- * ---Make directory.
- POKE 56857, 57
- CASE command="RD"
- * ---Remove directory.
- POKE 56857, 58
- CASE command="CD"
- * ---Change directory.
- POKE 56857, 59
- OTHERWISE
- * ---Not a directory command.
- RETURN
- ENDCASE
- * ---Execute the routine.
- CALL path
- IF $(path,1,2) <> "E "
- * ---NO OPERATION ERROR.
- STORE F TO is:error
- ENDIF
- RETURN
- * EOF: DOS-PATH.PRG